package org.deschutter.hibernate;

import javax.persistence.*;

/**
 * User: Berten De Schutter
 * Date: 01-Oct-2009
 * Time: 13:39:04
 */
@Entity
@Table(catalog = "scimitar", name = "planet_score_rank")
public class PlanetScoreRank {
    private int id;

    @Id
    @Column(name = "Id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    private String planetname;

    @Basic
    @Column(name = "planetname")
    public String getPlanetname() {
        return planetname;
    }

    public void setPlanetname(String planetname) {
        this.planetname = planetname;
    }

    private String rulername;

    @Basic
    @Column(name = "rulername")
    public String getRulername() {
        return rulername;
    }

    public void setRulername(String rulername) {
        this.rulername = rulername;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PlanetScoreRank that = (PlanetScoreRank) o;

        if (id != that.id) return false;
        if (planetname != null ? !planetname.equals(that.planetname) : that.planetname != null) return false;
        if (rulername != null ? !rulername.equals(that.rulername) : that.rulername != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (planetname != null ? planetname.hashCode() : 0);
        result = 31 * result + (rulername != null ? rulername.hashCode() : 0);
        return result;
    }
}
